package com.baizhi;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

import java.util.Date;
@TableName("subway")
public class Subway {
    @TableId(type = IdType.AUTO)
    private int  id;
    private String name;
    private Double price;
    @JSONField(format="yyyy年MM月dd日")
    private Date startTime;

    @Override
    public String toString() {
        return "Subway{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", price=" + price +
                ", startTime=" + startTime +
                '}';
    }

    public Subway() {
    }

    public Subway(int id, String name, Double price, Date startTime) {
        this.id = id;
        this.name = name;
        this.price = price;
        this.startTime = startTime;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }
}
